package br.com.news.service;

import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;

import br.com.news.utils.business.exception.BusinessException;
import br.com.news.utils.business.interfaces.IEmailIndicacaoBusiness;
import br.com.news.utils.database.beans.EmailIndicacaoBean;
import br.com.news.utils.service.exception.ServiceException;
import br.com.news.utils.service.interfaces.IEmailIndicacaoService;

@Named
public class EmailIndicacaoService implements IEmailIndicacaoService{
	
	@Inject
	private IEmailIndicacaoBusiness emailIndicacaoBusiness;

	@Override
	public List<EmailIndicacaoBean> findAll() throws ServiceException{
		try {
			return emailIndicacaoBusiness.findAll();
		} catch (BusinessException e) {
			throw new ServiceException(e);
		}
	}

}
